<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no">
  <title>WMTSLayer - 4.6</title>
  <link rel="stylesheet" href="https://js.arcgis.com/4.5/esri/css/main.css">

  <style>
    html,
    body,
    #viewDiv {
      padding: 0;
      margin: 0;
      height: 100%;
      width: 100%;
    }

    .esri-layer-list {
      width: 310px;
    }
  </style>

  <script src="https://js.arcgis.com/4.5/"></script>

  <script>
    var map, view;

    require([
      "esri/config",
      "esri/Map",
      "esri/views/SceneView",
      "esri/layers/WMTSLayer",
	  "esri/layers/SceneLayer",
      "dojo/domReady!"
    ], function(
      esriConfig,
      Map,
      SceneView,
      WMTSLayer,
	  SceneLayer
    ) {
      esriConfig.request.corsEnabledServers.push("https://120win105.esrichina.com");

      layer = new WMTSLayer({
        url: "https://120win105.esrichina.com/server/rest/services/xuds/China2364/MapServer/WMTS/1.0.0/WMTSCapabilities.xml"
      });
      map = new Map({ 
      });
      view = new SceneView({
		viewingMode: "local",
        container: "viewDiv",
        map: map
      });
	  
	  sceneLayer = new SceneLayer({
		url:"https://120win105.esrichina.com/server/rest/services/Hosted/aaa2364/SceneServer/layers/0"
	  })
	  map.add(sceneLayer);
	  map.add(layer);
    });
  </script>

</head>
<body>
  <div id="viewDiv"></div>
</body>
</html>